<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>ViewUI example</title>
    <link rel="stylesheet" type="text/css" href="http://unpkg.com/view-design/dist/styles/iview.css">
    <script type="text/javascript" src="http://vuejs.org/js/vue.min.js"></script>
    <script type="text/javascript" src="http://unpkg.com/view-design/dist/iview.min.js"></script>
</head>



<div id="app">
	<p>测222试</p>
	<ul>
		   <li v-for="value,index in weather.forecast" :key="index">
			   {{index}}{{value}}
		   </li>
	</ul>

<!--    <h3>城市:{{ weather.city }}</h3>
    <h4>{{ weather.ganmao }}</h4>  
    <ul>
        <li v-for="item in weather.forecast">
           {{item.date}} <br/> {{item.type}} {{ item.high }}
            {{ item.low }}
            {{item.fengli}}
          <span v-if="item.low.indexOf(\"-\")">
                - OUT OF STOCK
            </span> 
        </li>
    </ul> -->


    <!-- <h4>昨天:{{ weather.yesterday.date }}</h4>
    <h4>{{ weather.yesterday }}</h4>
    <span>{{ weather }}</span> -->

    <!-- <ul>
        <li v-for="product in products">
            {{ product.quantity }}  {{ product.name }}
            <span v-if="product.quantity === 0">
                - OUT OF STOCK
            </span>
        </li>
    </ul> -->
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            weather: [],
            products: []
        },
        created() {
            fetch('http://wthrcdn.etouch.cn/weather_mini?city=临沂')
                .then(response => response.json())
                .then(json => {
                    this.weather = json.data
                })
                // ,
            // fetch('https://api.myjson.com/bins/74l63')
            //     .then(response => response.json())
            //     .then(json => {
            //         this.products = json.products
            //     })
        }
    })
</script>